<template>
  <div class="dialog-container">
    <el-dialog
      title="详情"
      :visible.sync="dialogVisible"
      custom-class="custom-dialog"
      width="70%"
      :before-close="handleClose"
      @opened="initData"
    >
      <el-form
        ref="form"
        class="query-more-form formTop"
        size="mini"
        label-width="85px"
        :model="obj"
      >
        <el-row :gutter="2">
          <el-col :span="6" class="mr20">
            <el-form-item label="标题">
              <el-input
                class="search-ipt"
                placeholder="标题"
                maxlength="255"
                v-model="obj.title"
              />
            </el-form-item>
          </el-col>

          <el-col :span="6" class="mr20">
            <el-form-item label="编号">
              <el-input
                class="search-ipt"
                placeholder="编号"
                maxlength="255"
                v-model="obj.number"
              />
            </el-form-item>
          </el-col>

          <el-col :span="6">
            <el-form-item label="关键字">
              <el-input
                class="search-ipt"
                placeholder="关键字"
                maxlength="255"
                v-model="obj.keyword"
              />
            </el-form-item>
          </el-col>

           <el-col :span="6" class="mr20">
            <el-form-item label="来源部门">
              <el-input
                class="search-ipt"
                placeholder="来源部门"
                maxlength="255"
                v-model="obj.deptValue"
              />
            </el-form-item>
          </el-col>
          
          <el-col :span="6" class="mr20">
            <el-form-item label="大类">
              <el-input
                ref="industry"
                placeholder="大类"
                v-model="obj.subClassCompleteName"
              >
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="小类">
              <el-input
                ref="industry"
                placeholder="小类"
                v-model="obj.subClassName"
              >
              </el-input>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row :gutter="20">
        </el-row>

        <el-row :gutter="20">
          <quill-editor
            ref="text"
            v-model="obj.content"
            class="myQuillEditor"
            :options="editorOption"
          />
        </el-row>
        <!-- <div align="center">
          <el-button class="submit" type="primary" @click="submit">提交</el-button>
</div> -->
        <!-- <el-input readonly type="textarea" v-model="content"></el-input> -->
      </el-form>
    </el-dialog>
  </div>
</template>

<script>
import { quillEditor } from "vue-quill-editor";
import "quill/dist/quill.core.css";
import "quill/dist/quill.snow.css";
import "quill/dist/quill.bubble.css";
import "./quill-editor.css";
export default {
  name: "KnowledgeDetailsDialog",
  components: {
    quillEditor,
  },
  props: {
    dialogVisible: {
      type: Boolean,
      default: false,
    },
    obj: {
      type: Object,
      default: null,
    },
  },
  data() {
    return {
      data: {},
      content: "",
      editorOption: {
        placeholder: "编辑内容",
      },
    };
  },
  created() {},
  mounted() {},
  methods: {
    initData() {},
    handleClose() {
      this.$emit("closeDialog");
    },
    submit() {
      // console.log(this.$refs.text.value);
    },
  },
};
</script>

<style lang='scss' scoped>
.mr20{
  margin-right: 20px;
}
</style>
